﻿
using System;
using System.ComponentModel.Composition;
using System.Windows;
using Red.Controls.Shell;

namespace Red.Toolkit.TestEditor
{
    /// <summary>
    ///     This is how we make the editor a plug-in
    /// </summary>
    [Export( typeof( IEditorInfo ) )]
    public class EditorInfo : IEditorInfo
    {
        public string Name
        {
            get { return "Sample Toolkit App"; }
        }

        public Type WindowClass
        {
            get { return typeof( TestEditor ); }
        }

        public Type SettingsClass
        {
            get { return typeof( UserSettings ); }
        }
    }
    
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class TestEditor : RedEditorWindow
    {
        public TestEditor( IEditorHost host, EditorInstanceData instanceData, EditorSharedData sharedData )
            : base( host, instanceData, sharedData )
        {
            InitializeComponent();
        }

        private void Button_Click( object sender, RoutedEventArgs e )
        {
            Page1.Title = "Even cooler name!";
        }
    }
}
